home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 05.zip / BS1 part 5 / PDraw3.0.adf / pdraw_rex.lzh / Command.pdrx < prev    next >
Text File  |  1992-06-24  |  662b  |  36 lines

  1. /*
  2. @N
  3.  
  4. This Genie allows you to issue AREXX commands to PDraw directly. Recommended for advanced users only.
  5. */
  6.  
  7. signal on error
  8. signal on syntax
  9.  
  10. call pdm_AutoUpdate(0)
  11. defvalue    = getclip(pdm_defval)
  12. command = pdm_GetUserText(40, "Enter Command :"defvalue)
  13. if command = '' then exit_msg()
  14. call setclip(pdm_defval, command)
  15.  
  16. interpret "returnval = "command
  17. call exit_msg(command" = "returnval)
  18.  
  19. error: 
  20. syntax: 
  21. do
  22.     if rc = 16 then exit_msg(command)
  23.     exit_msg(command ": "errortext(rc))
  24.  
  25. end
  26.  
  27.  
  28. exit_msg:
  29. do
  30.     parse arg message
  31.  
  32.     call pdm_updatescreen(1)
  33.     if message ~= '' then call pdm_Inform(0, message)
  34.     call pdm_AutoUpdate(1)
  35.     exit
  36. end